<?php
$url = new Url();
?>
<script src="<?=Yii::app()->params["urlRs"] ?>/js/messenger.js" type="text/javascript"></script>
<div class="naptien">
    <h2><strong class="clred">Hòm Thư</strong></h2>
</div>
<div class="Tabs clearfix">
    <div class="fl">
        <ul class="clearfix">      
            <li><a href="<?=$url->createUrl("messenger/index")?>" <?=isset($_GET['cat']) && $_GET['cat'] == 1 ?"class='active'":""?>><span><strong>Thư đã nhận</strong></span></a></li>
            <li><a href="<?=$url->createUrl("messenger/sentMessenger")?>" <?=isset($_GET['cat']) && $_GET['cat'] == 2 ?"class='active'":""?>><span><strong>Thư đã gửi</strong></span></a></li>
            <li class="last"><a href="<?=$url->createUrl("messenger/compose")?>"><span><strong>Gửi thư</strong></span></a></li>
        </ul>
    </div>
    <div class="fr"><button class="btn-orangeSmall" onclick="window.location='<?=$url->createUrl("messenger/compose",array("id"=>$data["id"]))?>'" type="submit"><span><b>Chuyển tiếp</b></span></button> <button class="btn-redSmall" type="submit" onclick="deleteRow(<?=$data['id']?>);"><span><b>Xóa</b></span></button></div>
</div>

<div class="box_tab">
    <div class="tab_inner">
        <div class="tab_cont">
            <div class="inner_tab_cont">
                <div class="box_white">
                    <div class="box_tt1" style="margin-top:5px;">
                        <ul class="form2">
                            <li class="clearfix">
                                <label>Tiêu đề : </label>
                                <div class="filltext">
                                    <p>
                                        <?=$data['subject']?>
                                    </p>
                                </div>
                            </li>
                            <li class="clearfix">
                                <label>Người gửi : </label>
                                <div class="filltext">
                                    <p>
                                        <?=$data['sender_name']?>
                                    </p>
                                </div>
                            </li>
                            <li class="clearfix">
                                <label>Người nhận : </label>
                                <div class="filltext">
                                    <p>
                                        <?=$data['receiver_name']?>
                                    </p>
                                </div>
                            </li>
                            <li class="clearfix">
                                <label>Thời gian :</label>
                                <div class="filltext">
                                    <div class="fl">
                                        <?=date("H:i d/m/Y", strtotime($data['create_date']))?>
                                    </div>
                                    <div class="fr">
                                    <button class="btn-red" type="submit" onclick="history.go(-1);"><span><b>Quay lại</b></span></button>
                                    </div>                                  
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="box_tt1" style="margin-top:5px;">
                    <?=$data['content']?>
                    </div>
                    <div id="result_submit"></div>
                </div>
            </div>
        </div>
    </div>
</div>